@extends('layouts.master',['loading_word'=>'加载中'])
<style>
    .intro div{
        line-height: 1.7;
    }
    .intro div img{
        margin-left:90px;
	margin-top:15px;
	margin-bottom:15px;
    }
</style>
@section('title')
    {{$scene->name}}
@endsection
@section('content')
    {{--logo 搜索开始--}}
    @include('widget.search')
    {{--logo 搜索结束--}}
    {{--景点详细介绍开始--}}
    <div id="i-content" class="clearfix">
        <div class="t-con-left">
            <div class="t-con-l-top clearfix">
                <div class="t-img">
                    <img src="{{$scene->cover}}" alt="">
                    <div class="t-btn">
                        <div class="t-btn-left">&lt;</div>
                        <div class="t-btn-right">&gt;</div>
                    </div>
                </div>
                <div class="t-text">
                    <ul>
                        <li class="t-title">{{$scene->name}}</li>
                        <input class="areaId" type="hidden" value="{{$scene->getArea->id}}">
                        <li class="t-area"><i class="iconfont icon-dizhi"></i> <span>{{$scene->getArea->name}}</span></li>
                        <li class="t-price">￥ <span>{{$scene->price}}</span> 起</li>
                        <li class="t-info">
                            <span class="t-sale">销量：<i>302</i></span>|
                            <span class="t-degree">满意度：<i>98</i>%</span>|
                            <span class="t-recommend">推荐：<i>225</i></span>
                        </li>
                        <li class="t-selling-point"><span>景点卖点</span><i>晶莹水珠洒似珍珠</i></li>
                        <li class="t-theme">景区主题：<span>森林</span><i>AAAAA</i></li>
                        <li class="t-tickets">取票方式：<span>景点售票处自取</span></li>
                        <li class="t-pay">支付方式：<span><img src="/imgs/pay_zfb.gif" alt=""></span></li>
                    </ul>
                </div>
            </div>
            <div class="t-con-bottom">
                <p class="t-introduce">景点介绍</p>
                <hr>
		<div class="intro">
                {!! $scene->intro !!}
		</div>
            </div>
        </div>
        <div class="t-con-right">
            <div class="t-con-user">
                <div class="t-user clearfix">
                    <div class="t-user-head">
                        <img src="/imgs/user-headimg.png" alt="">
                    </div>
                    <div class="t-user-text">
                        <p>Hi，@if(Auth::check()) <span style="color: #ffcc99;"> {{Auth::user()->display_name}} </span>  @else 您好！ @endif</p>
                        <p>感谢您的访问</p>
                    </div>
                </div>
                <div class="t-btn clearfix">
                    @if(Auth::check())
                        <div class="t-login-btn"><a href="/">回到首页</a></div>
                        <div class="t-register-btn"><a onclick="logout()" style="cursor: pointer;">注销登录</a></div>
                    @else
                        <div class="t-login-btn"><a href="/index.php/auth/login">立即登录</a></div>
                        <div class="t-register-btn"><a href="/index.php/auth/regist">免费注册</a></div>
                    @endif
                </div>
            </div>
            <div class="t-raiders">
                <p>最新攻略</p>
                <ul class="t-list-content">
                </ul>
            </div>
        </div>
    </div>
    {{--景点详细介绍结束--}}
    <script>
        $.post(
            "/index.php/sidebar/scene/list",
            {areaId : $(".areaId").val()},
            function(data){
                if(data.res){
                    var list = data.scenes;
                    var content = $("<div></div>");
                    $.each(list,function(i){
                        var loading = $("<div>加载中</div>")
                        $(".t-list-content").append(loading);
                        var li = $("<li><img src='"+list[i].img+"' /><span><a href='"+list[i].url+"'>"+list[i].name+"</a></span></li>");
                        content.append(li);
                    })
                    setTimeout(function(){
                        $(".t-list-content").html(content);
                    },1000)
                }else{
                    $(".t-list-content").html("数据加载失败");
                    alert(data.info);
                }
            }
        )








               // $.post('/index.php/sidebar/scene/list',{areaId:$(".areaId").val()},function (data) {
        //    if (data.res){
         //       for(var i = 0; i < data.scenes.length; i++){
           //         var li = $("<li><img src='"+data.scenes[i].img+"' /><span><a href='"+data.scenes[i].url+"'>"+data.scenes[i].name+"</a></span></li>");
        //            $(".t-list-content").append(li);
         //       }
          //  }
       // });
    </script>
@endsection
